package cn.edu.dgut.sai;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @author Sai
 */
class RunningProcessThread {

    void run() {
        try {

            int millis = ThreadLocalRandom.current().nextInt(20000);
            String currentThread = Thread.currentThread().getName();

            System.out.println("异步线程--" + currentThread + " 执行开始...");
            System.out.println("异步线程--" + currentThread + " 将睡眠 " + millis + " 毫秒.");
            Thread.sleep(millis);
            System.out.println("异步线程--" + currentThread + " 执行结束...");

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
